// @ts-ignore
/* eslint-disable */
import request from '@/services/request';

/** 查询EQ列表 GET /v1/eq */
export async function eqV1ControllerIndex(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerIndexParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.EQResult[] }>('/v1/eq', {
    method: 'GET',
    params: {
      // pageSize has a default value: 20
      pageSize: '20',

      ...params,
    },
    ...(options || {}),
  });
}

/** 创建EQ POST /v1/eq */
export async function eqV1ControllerCreate(body: API.EQDto, options?: { [key: string]: any }) {
  return request<API.EQResult>('/v1/eq', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询EQ GET /v1/eq/${param0} */
export async function eqV1ControllerShow(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerShowParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.EQShowResult>(`/v1/eq/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除EQ DELETE /v1/eq/${param0} */
export async function eqV1ControllerDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerDeleteParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<any>(`/v1/eq/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新EQ PATCH /v1/eq/${param0} */
export async function eqV1ControllerUpdate(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerUpdateParams,
  body: API.EQUpdateDto,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.EQResult>(`/v1/eq/${param0}`, {
    method: 'PATCH',
    headers: {
      'Content-Type': 'application/json',
    },
    params: { ...queryParams },
    data: body,
    ...(options || {}),
  });
}

/** 通过分段频响，获取滤波器 POST /v1/eq/get-filters-by-segment-freq */
export async function eqV1ControllerGetFiltersBySegmentFreq(
  body: API.EQGetFiltersBySegmentFreqDto,
  options?: { [key: string]: any },
) {
  return request<API.EQGetFiltersBySegmentFreqResult>('/v1/eq/get-filters-by-segment-freq', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 固定目标曲线，切换原始耳机和滤波器获取滤波器 POST /v1/eq/get-filters-by-temp-eq */
export async function eqV1ControllerGetFiltersByTempEq(
  body: API.EQGetFiltersByTempEQDto,
  options?: { [key: string]: any },
) {
  return request<API.EQGetFiltersByTempEQResult>('/v1/eq/get-filters-by-temp-eq', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 查询公开的EQ GET /v1/eq/open */
export async function eqV1ControllerIndexOpen(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerIndexOpenParams,
  options?: { [key: string]: any },
) {
  return request<{ total: number; list: API.EQOpenResult[] }>('/v1/eq/open', {
    method: 'GET',
    params: {
      // pageSize has a default value: 20
      pageSize: '20',
      ...params,
    },
    ...(options || {}),
  });
}

/** 查询EQ GET /v1/eq/open/${param0} */
export async function eqV1ControllerShowOpen(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.EqV1ControllerShowOpenParams,
  options?: { [key: string]: any },
) {
  const { uuid: param0, ...queryParams } = params;
  return request<API.EQOpenShowResult>(`/v1/eq/open/${param0}`, {
    method: 'GET',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}

/** 与当前频响曲线相似的耳机 POST /v1/eq/top10 */
export async function eqV1ControllerTop10(
  body: API.EQTop10ListDto,
  options?: { [key: string]: any },
) {
  return request<API.EQTop10Result[]>('/v1/eq/top10', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
